<?php $this->Html->addCrumb('Disputes'); ?>
<style type="text/css">
td p span{color:#00B050;}
td.vendor h2 {font-size:20px; color: #00B050;}
</style>
<div class="global-title">Dispute</div>
<?php if(!empty($disputelist)): ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="check-out-table">
	<tr>
            <th bgcolor="#ccc">Case ID</th>
            <th bgcolor="#ccc">Opened On</th>
            <th bgcolor="#ccc">Expires On</th>
            <th bgcolor="#ccc">Buyer ID</th>
            <th bgcolor="#ccc">Status</th>
            <th bgcolor="#ccc">Action</th>
        </tr>
	
	<?php foreach($disputelist as $dispute):?>
        <tr id="row_<?php echo $dispute['Dispute']['id'];?>">
                <td style="vertical-align: middle;">
                    <a href="javascript:void(0);" controller="products" action="viewdispute" 
                       ElmID="<?php echo $dispute['Dispute']['id']; ?>" onclick='showPop(this)'> <?php echo $dispute['Dispute']['id'];?></a>
               
                </td>
                <td style="vertical-align: middle;">
                 <?php echo date('d-m-Y',  strtotime($dispute['Dispute']['open_date']));?>
                </td>
                <td style="vertical-align: middle;">
                    <?php echo date('d-m-Y',  strtotime($dispute['Dispute']['expire_date']));?>
                </td>
                <td style="vertical-align: middle;">
                <?php echo $dispute['Disputer']['username'];?>
                </td>
                <td style="vertical-align: middle;">
                <?php echo $dispute['Dispute']['status'];?>
                </td>
                    <td style="vertical-align: middle;">
                    <a href="javascript:void(0);" controller="messages" action="dispute_message" title="Respond"
                       ElmID="<?php echo $dispute['Dispute']['id']; ?>" onclick='showPop(this)'>Respond</a>&nbsp;|&nbsp;
                    <a href="javascript:void(0);" controller="messages" action="dispute_message" title="History"
                       ElmID="<?php echo $dispute['Dispute']['id']; ?>" ElmID2="1" onclick='showPop(this)'>History</a>

                </td>
        </tr>
            <?php
            endforeach;
            ?>			
</table>
<?php else:?>
<br /><br />
<h2>Your Dispute list is empty.</h2>
<br /><br /><br />
<?php endif;?>